<template>
  <div>
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>
          <el-avatar
            size="small"
            src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
          ></el-avatar>
        </span>
        <span class="name">{{ comment.user_name }}</span>
        <p>{{ comment.user_email }}</p>
      </div>
      <div class="content">
        <span>{{ comment.comment_content }}</span>
        <span class="date">{{ comment.comment_date }}</span>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    comment: {
      type: Object,
      required: true,
    },
  },
}
</script>

<style scoped>
.clearfix {
  height: 50px;
}
.date {
  font-size: 3px;
  color: gray;
  vertical-align: bottom;
  margin-left: 10px;
}
.name {
  position: relative;
  line-height: 10px;
}
.name::after {
  content: '+';
  width: 11px;
  height: 12px;
  background-color: rgb(239, 239, 239);
  position: absolute;
  top: -6px;
  left: 42px;
  line-height: 12px;
  text-align: center;
  border-radius: 5px;
}
p {
  font-size: 10px;
}
</style>
